<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keyword" content="">

    <title>项目族库 - BIM管理</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="__PUBLIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="__PUBLIC__/css/style.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet" />
    <!-- new styles-->
      <link href="__PUBLIC__/css/xxxstyle.css" rel="stylesheet" />

      <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="__PUBLIC__/js/html5shiv.js"></script>
      <script src="__PUBLIC__/js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
  <section id="container">
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper site-min-height">
              <!-- page start-->
                  <nav class="navbar navbar-inverse navbar-library" role="navigation">
                      <div class="collapse navbar-collapse navbar-ex1-collapse">
                          <!--<ul class="nav navbar-nav">-->
                              <!--<li class="dropdown">-->
                                  <!--<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">类目<b class="caret"></b></a>-->
                                  <!--<ul class="dropdown-menu">-->
                                      <!--<li><a href="#">A</a></li>-->
                                      <!--<li><a href="#">B</a></li>-->
                                  <!--</ul>-->
                              <!--</li>-->
                          <!--</ul>-->
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">类型</a>
                                  <ul class="dropdown-menu wide-full">
                                      <div class="yamm-content">
                                          <ul class="listCategories listCaType">
                                             <foreach name="cate['type']" item="v" key="k">
	                                              <li onclick="ajaxlibrary(1,'',1,'{$v.name}')"><a>
	                                                  <span class="tooltips" data-toggle="tooltip" data-original-title="{$v.name}" data-placement="top"><img src="__PUBLIC__/imgLibrary/icon/{$v.img}" /></span>
	                                              </a></li>
                                              </foreach>
                                          </ul>
                                      </div>
                                  </ul>
                              </li>
                          </ul>
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">产品系列</a>
                                  <ul class="dropdown-menu wide-full">
                                      <li>
                                          <div class="yamm-content">
                                              <ul class="listCategories">
                                               <foreach name="cate['series']" item="s" key="k">
                                                  <li onclick="ajaxlibrary(1,'',2,'{$s.name}')"><a>
                                                      <span class="tooltips" data-toggle="tooltip" data-original-title="{$s.name}" data-placement="top"><img src="__PUBLIC__/imgLibrary/icon/{$s.img}" /></span>
                                                  </a></li>
                                                </foreach>
                                              </ul>
                                          </div>
                                      </li>
                                  </ul>
                              </li>
                          </ul>
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">文件类型</a>
                                  <ul class="dropdown-menu wide-full">
                                      <div class="yamm-content">
                                          <ul class="listFileType">
                                           <foreach name="cate['file_type']" item="f" key="k">
                                              <li onclick="ajaxlibrary(1,'',3,'{$f.name}')"><a>
                                                  <span><img src="__PUBLIC__/imgLibrary/icon/{$f.img}" /></span>
                                                  <p>{$f.name}</p>
                                              </a></li>
                                           </foreach>   
                                          </ul>
                                      </div>
                                  </ul>
                              </li>
                          </ul>
                          <ul class="nav navbar-nav yamm mega-menu">
                              <li class="dropdown">
                                  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">品牌</a>
                                  <ul class="dropdown-menu wide-full">
                                      <div class="yamm-content">
                                          <ul class="listFileType">
                                           <foreach name="cate['brand']" item="b" key="k">
                                              <li onclick="ajaxlibrary(1,'',4,'{$b.id}')"><a>
                                                  <span>{$b.name}</span>
                                              </a></li>
                                            </foreach>
                                          </ul>
                                      </div>
                                  </ul>
                              </li>
                          </ul>
                      </div>
                  </nav>
                  <section class="panel mb10">
                      <div class="panel-body pbodypad10">
                          <div class="input-group searchLine">
	                              <input type="text" name="searchname" placeholder="搜索..." class="input-sm form-control">
	                          <span class="input-group-btn">
	                            <button type="button" class="btn btn-sm btn-submit searchBtn" onclick="search()"><i class="icon-search"></i></button>
	                          </span>
                          </div>
                       <if condition="$pdata eq 2">
                          <a href="{:U('Family/libraryadd')}">
                           <div class="pull-right" style="margin-top:-25px;">
						         <button type="button" class="btn btn-submit btn-xs"><i class="icon-plus"></i>添加产品</button>
						   </div>
						  </a>
						  <else/>
						   <div class="pull-right" style="margin-top:-25px;">
						          <button class="btn btn-default btn-xs"><i class="glyphicon glyphicon-exclamation-sign"></i>无权限添加产品</button>
						   </div>
					   </if>
                      </div>
                  </section>
                  <section class="panel">
                    <div id="ajaxlibrary">
                     
				    </div>
                  </section>
              <!-- page end -->
          </section>
      </section>
      <!--main content end-->
  </section>
    <!-- js placed at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="__PUBLIC__/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="__PUBLIC__/js/jquery.scrollTo.min.js"></script>
    <script src="__PUBLIC__/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/jquery.customSelect.min.js" ></script>

    <!--common script for all pages-->
    <script src="__PUBLIC__/js/common-scripts.js"></script>

    <!--new script for this page only-->
  </body>
</html>
<script>
	$(document).ready(function(){
		ajaxlibrary();
	});
	
	// ajax 抓取页面
	function ajaxlibrary(page=1,name='',status='',type=""){
	        $.ajax({
	            type : "POST",
	            url:'__URL__/ajaxlibrary/p/'+page,
	            data : {name:name,type:type,status:status},
	            success: function(data){
	                $("#ajaxlibrary").html('');
	                $("#ajaxlibrary").append(data);
	            }
	        });
	}
	
	  //search
    function search(){
  	  var name = $("input[name='searchname']").val();
 	 	ajaxlibrary(1,name);
    }
</script>
